package com.its.feign.server.domain.d1.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.its.feign.server.domain.d1.model.entity.DtJson;
import com.its.feign.server.domain.d1.model.repo.DtJsonRepo;
import com.its.feign.server.domain.d1.service.DtJsonService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author xiaxp
 * @Date 12/28/21 17:22
 * @Description
 */
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class DtJsonServiceImpl extends ServiceImpl<DtJsonRepo, DtJson> implements DtJsonService {

    @Override
    public DtJson getOneByNameLike(String name) {
        QueryWrapper<DtJson> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("name", name);
        return baseMapper.selectOne(queryWrapper);
    }
}


